import type { App } from 'vue';

import elFocus from './modules/elFocus';
import integer from './modules/integer';
import digit from './modules/digit';
import trim from './modules/trim';
import clickOutside from './modules/clickOutside';

const directivesList: { [key: string]: any } = {
    elFocus,
    integer,
    digit,
    trim,
    clickOutside,
};

const directives = {
    install: function (app: App) {
        Object.keys(directivesList).forEach(key => {
            app.directive(key, directivesList[key]);
        });
    },
};

export default directives;
